import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SEntityId } from "../Public/SEntityId";
import { SIslandPos } from "./SIslandPos";
type int = number;
//class SRobIslandPlayer
    
    export  class SRobIslandPlayer extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SRobIslandPlayer();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.entityId.__write(arg1);
            arg1.writeString(this.name);
            arg1.writeString(this.petName);
            arg1.writeInt(this.petId);
            arg1.writeInt(this.petChangeCode);
            arg1.writeInt(this.petReinLevel);
            arg1.writeInt(this.petLevel);
            arg1.writeInt(this.guildPos);
            this.pos.__write(arg1);
            arg1.writeInt(this.joinSeconds);
            arg1.writeInt(this.moveCD);
            arg1.writeInt(this.life);
            arg1.writeInt(this.maxLife);
            arg1.writeInt(this.assistTimes);
            arg1.writeBool(this.lockPet);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(arg1);
            this.name = arg1.readString();
            this.petName = arg1.readString();
            this.petId = arg1.readInt();
            this.petChangeCode = arg1.readInt();
            this.petReinLevel = arg1.readInt();
            this.petLevel = arg1.readInt();
            this.guildPos = arg1.readInt();
            this.pos = new SIslandPos();
            this.pos.__read(arg1);
            this.joinSeconds = arg1.readInt();
            this.moveCD = arg1.readInt();
            this.life = arg1.readInt();
            this.maxLife = arg1.readInt();
            this.assistTimes = arg1.readInt();
            this.lockPet = arg1.readBool();
            return;
        }

        public /* const */_type: int=952;

        public /* var */entityId: SEntityId;

        public /* var */name: string;

        public /* var */petName: string;

        public /* var */petId: int;

        public /* var */petChangeCode: int;

        public /* var */petReinLevel: int;

        public /* var */petLevel: int;

        public /* var */guildPos: int;

        public /* var */pos: SIslandPos;

        public /* var */joinSeconds: int;

        public /* var */moveCD: int;

        public /* var */life: int;

        public /* var */maxLife: int;

        public /* var */assistTimes: int;

        public /* var */lockPet: Boolean;

        public static /* var */_regist: SRobIslandPlayer;
    }

            SRobIslandPlayer._regist = new SRobIslandPlayer(true);
        